ext2defines = []
cc = new_compiler()
cc.add_library("ext2fs")
- try:
- if hasattr(cc, "has_function") and cc.has_function("ext2fs_open2"):
- ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) )
- else:
- sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n")
- sys.stderr.write(" disk support for ext2.\n")
- except AttributeError:
- pass
+ if hasattr(cc, "has_function") and cc.has_function("ext2fs_open2"):
+ ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) )
+ else:
+ sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n")
+ sys.stderr.write(" disk support for ext2.\n")
ext2 = Extension("grub.fsys.ext2._pyext2",
extra_compile_args = extra_compile_args,